package com.woniu.woniuproject.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author wugd
 * @create 2020/11/9
 * @since 1.0.0
 */

@Configuration
public class WebMvcConfig {

    @Bean
    public WebMvcConfigurer webMvcConfigurer(){
        return new WebMvcConfigurer() {
            @Override
            public void addViewControllers(ViewControllerRegistry registry) {
                registry.addViewController("/1.html").setViewName("1");
                registry.addViewController("/").setViewName("1");
                registry.addViewController("/index.html").setViewName("index");
                registry.addViewController("/article.html").setViewName("article");
                registry.addViewController("/borrow.html").setViewName("borrow");
                registry.addViewController("/invest.html").setViewName("invest");
                registry.addViewController("/noticelist.html").setViewName("noticelist");
                registry.addViewController("/problem.html").setViewName("problem");
                registry.addViewController("/register.html").setViewName("register");
                registry.addViewController("/login.html").setViewName("login");
                registry.addViewController("/forget.html").setViewName("forget");
                registry.addViewController("/course_list.html").setViewName("course_list");
                registry.addViewController("/chanpin.html").setViewName("chanpin");
                registry.addViewController("/zhengshu.html").setViewName("zhengshu");
                registry.addViewController("/xinxi.html").setViewName("xinxi");
                registry.addViewController("/anquan.html").setViewName("anquan");
                registry.addViewController("/pro.html").setViewName("pro");
                registry.addViewController("/ketang.html").setViewName("ketang");
                registry.addViewController("/monthrepay.html").setViewName("monthrepay");
                registry.addViewController("/monthrepays.html").setViewName("monthrepays");
                registry.addViewController("/usercenter.html").setViewName("usercenter");
                registry.addViewController("/usercenter-investcontrol-investrecord.html").setViewName("usercenter-investcontrol-investrecord");
                //registry.addViewController("/we.html").setViewName("we");
            }
        };
    }
}
